package com.lsyw.intergrate.config;

import com.p6spy.engine.spy.appender.MessageFormattingStrategy;

public class P6spyLogger implements MessageFormattingStrategy {


	@Override
	public String formatMessage(int connectionId, String now, long elapsed, String category, String prepared, String sql, String url) {
		return !"".equals(sql.trim()) ? "[ " + now + " ] --- | took "
			+ elapsed + "ms | " + category + " | connection " + connectionId + "\n "
			+ sql + ";" : "";
	}
}
